<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.gem.ererlush.DOMImpl,com.gem.ererlush.Food,java.util.List" %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'MyJsp.jsp' starting page</title>
  </head>
  
  <body>
  <%
  DOMImpl dom=new DOMImpl();
		String fileName="D:/DOMXml.xml";
		dom.init();
		dom.createXML(fileName);
		dom.parseXML(fileName);
		List<Food> food=dom.getRecordList(fileName);
		for(int i=0;i<food.size();i++){  %>
	<%="<Food>" %>
<%="<FoodId>"+food.get(i).getFoodId()+"</FoodId>"%>
<%="<ChefId>"+food.get(i).getChefId()+"</ChefId>"%>
<%="<Time>"+food.get(i).getTime()+"</Time>"%>
<%="<Info>"+food.get(i).getInfo()+"</Info>"%>
<%="<Collection>"+food.get(i).getCollection()+"</Collection>"%>
<%="<Attention>"+food.get(i).getAttention()+"</Attention>"%>
<%="<Discuss>"+food.get(i).getDiscuss()+"</Discuss>"%>
<%="<Images>"+food.get(i).getImage()+"</Images>"%>
<%="<Come>"+food.get(i).getCome()+"</Come>"%>

	<%="</Food>" %>	
		<%} %>
  </body>
</html>
